/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import connectivity.QueryManager;
import main.BarApplication;

/**
 *
 * @author Home
 */
public class Staff {
    

    private int StaffId;
    private int functionId;
    private String funtionname;
    private String firstname;
    private String middlename;
    private String lastname;
    private String gender;
    private String birthday;
    private String telephoneNumber;
    private String mobilePhone;
    private String email;
    private String password;
    private int branchId;

 
    

    public Staff(int StaffId, String firstname, String middlename, String lastname, String gender, String birthday, String telephoneNumber, String mobilePhone, String email, String password, int branchId, int functionId) {
        this.StaffId = StaffId;
        this.firstname = firstname;
        this.middlename = middlename;
        this.lastname = lastname;
        this.gender = gender;
        this.birthday = birthday;
        this.telephoneNumber = telephoneNumber;
        this.mobilePhone = mobilePhone;
        this.email = email;
        this.password = password;
        this.branchId = branchId;
        this.functionId = functionId;
    }

    public Staff() {

    }

    public Staff(int functionId) {
        this.functionId = functionId;
    }
    
    // constructor voor de medewerkers functies 
    public Staff(int functionId, String funtionname){
    this.functionId = functionId;
    this.funtionname = funtionname;
    }

        /**
     * Deze constructor opgezet voor het bepalen welke rechten een medewerker heeft.
     * Deze zal vooral aangeroepen worden in het login/aanmeldscherm.
     * @param StaffId  datatype int
     * @param password datatype String
     * @param functionId  datatype int
     */
    public Staff(int StaffId, String password, int functionId) {
        this.StaffId = StaffId;
        this.functionId = functionId;
        this.password = password;
    }
    
        public void update() {
        QueryManager queryManager = BarApplication.getQueryManager();
        queryManager.updateStaff(this);
            //System.out.println(queryManager.updateStaff(this));
//        if(queryManager.updateStaff(this)){}
    }

    public void insert() {
        QueryManager queryManager = BarApplication.getQueryManager();
        queryManager.addStaff(this);
    }


    public int getFunctionId() {
        return functionId;
    }

    public void setFunctionId(int functionId) {
        this.functionId = functionId;
    }

    public String getFuntionname() {
        return funtionname;
    }

    public void setFuntionname(String funtionname) {
        this.funtionname = funtionname;
    }

    
    public int getStaffId() {
        return StaffId;
    }

    public void setStaffId(int StaffId) {
        this.StaffId = StaffId;
    }

    public String getFirstname() {
        return firstname;
    }

    public void setFirstname(String firstname) {
        this.firstname = firstname;
    }

    public String getMiddlename() {
        return middlename;
    }

    public void setMiddlename(String middlename) {
        this.middlename = middlename;
    }

    public String getLastname() {
        return lastname;
    }

    public void setLastname(String lastname) {
        this.lastname = lastname;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getTelephoneNumber() {
        return telephoneNumber;
    }

    public void setTelephoneNumber(String telephoneNumber) {
        this.telephoneNumber = telephoneNumber;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getBranch() {
        return branchId;
    }

    public void setBranch(int branchId) {
        this.branchId = branchId;
    }
    

}
